-- GENERATED SPELL FOR [Defias Evoker] --


function spell0_1729(pUnit, Event) --@Flamestrike,n/a--
pUnit:FullCastSpellOnTarget(11829,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1729', 11000, 1)
end

function spell1_1729(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_1729', 0, 1)
end

function spell2_1729(pUnit, Event) --@Quick Flame Ward,n/a--
pUnit:FullCastSpellOnTarget(4979,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1729', 11500, 1)
end

function Sorts_1729(pUnit, Event)
local choix_sorts_1729 = math.random(0, 2)
if choix_sorts_1729 == 0 then
pUnit:RegisterEvent('spell0_1729', 1, 1)
end
if choix_sorts_1729 == 1 then
pUnit:RegisterEvent('spell1_1729', 1, 1)
end
if choix_sorts_1729 == 2 then
pUnit:RegisterEvent('spell2_1729', 1, 1)
end
end

function mob1729_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1729', math.random(1500, 3000), 1)
end

function mob1729_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1729_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1729_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1729, 1, 'mob1729_Action')
RegisterUnitEvent(1729, 2, 'mob1729_Leave')
RegisterUnitEvent(1729, 3, 'mob1729_Kill')
RegisterUnitEvent(1729, 4, 'mob1729_Die')
